docs(#5586): add security guidance for destructive forge operations - #5587
Conversation
Add a 'Security considerations for destructive operations' section to docs/contributing/forge-abstraction.md. The section covers three principles for callers of destructive forge methods (close, delete, merge, force-push): verify ownership before acting, prefer fail-closed defaults when authorization data is missing, and guard against predictable-name attacks where external actors could create resources on well-known branch paths. References closeStaleScaffoldPRs in internal/layers/commit.go as a positive example of all three principles. Includes review guidance to flag destructive operations missing authorization checks. Closes #5586
|
🤖 Finished Review · ✅ Success · Started 1:01 AM UTC · Completed 1:11 AM UTC |
Site previewPreview: https://6990d6f8-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Looks good to me Labels: PR adds documentation to docs/contributing/forge-abstraction.md |
|
🤖 Finished Retro · ✅ Success · Started 8:51 AM UTC · Completed 9:02 AM UTC |
Retro: PR #5587 — add security guidance for destructive forge operationsWorkflow timeline: Retro on PR #5478 filed issue #5586 (Jul 25 00:48 UTC) → Triage run 30137151836 (~3 min, labeled docs/security/medium/ready-to-code) → Code run 30137317007 (~6.5 min, single commit Total agent time: ~22 minutes. Wall-clock to merge: ~56 hours (55+ hours waiting for human review). What went well
Evidence for existing issues
No proposals filedAll identified improvement opportunities are covered by existing open issues. The workflow executed cleanly with zero rework, and the retro-to-fix pipeline demonstrated its intended value by closing a real documentation gap that had caused an extra review-fix cycle on PR #5478. |
Summary
docs/contributing/forge-abstraction.mdforge.Clientmethods: verify ownership before acting, prefer fail-closed defaults, and guard against predictable-name attackscloseStaleScaffoldPRsininternal/layers/commit.goas a positive example of all three principlesMotivation
PR #5478 added
CloseChangeProposalto the forge interface without authorization checks, requiring a review-fix cycle to add author verification. The forge-abstraction guide had no guidance on security considerations for destructive operations, so the code agent had no signal that such checks were needed.Testing
make lint-md-linkspasses — no broken links introducedCloses #5586
Post-script verification
agent/5586-forge-destructive-ops-guidance)253eb62573e4783735126d34c6283fecde9f0d71..HEAD)